Skip to content

Conversation

whitecat346
Copy link
Member

Feature/versions

概述

这个PR为Neo添加了模组信息读取的功能

更改

  • 添加ModInfo
  • 添加ModInfoReader
  • 添加VersionGameInfo
  • 删除GameVersionId
  • 删除MetadataFile

ModInfoReader使用方法

(直接抄的README)

  1. 引用命名空间:
using PCL.Neo.Core.Models.Minecraft.Mod;
  1. 调用静态方法 GetModInfo,传入模组文件夹路径:
var mods = await ModInfoReader.GetModInfo("你的mods文件夹路径");
  1. 遍历返回的模组信息:
foreach (var modInfo in mods)
{
    Console.WriteLine($"名称: {modInfo.Name}");
    Console.WriteLine($"描述: {modInfo.Description}");
    Console.WriteLine($"版本: {modInfo.Version}");
    Console.WriteLine($"图标路径: {modInfo.Icon}");
    Console.WriteLine($"主页: {modInfo.Url}");
}

@whitecat346 whitecat346 self-assigned this Jul 15, 2025
@whitecat346 whitecat346 added the 新功能 包括了新功能的更改 label Jul 15, 2025
@whitecat346 whitecat346 added this to the 0.1a milestone Jul 15, 2025
@whitecat346 whitecat346 linked an issue Jul 15, 2025 that may be closed by this pull request
@whitecat346
Copy link
Member Author

没人审,就过了吧……

@whitecat346 whitecat346 merged commit a269718 into PCL-Community:main Jul 16, 2025
4 checks passed
@whitecat346 whitecat346 deleted the feature/versions branch July 16, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

新功能 包括了新功能的更改

Projects

None yet

Development

Successfully merging this pull request may close these issues.

支持Mod,插件,资源包,管理等

1 participant